﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="orderdetail.aspx.cs" Inherits="OF.Web.admin.orderdetail" %>

<%@ Register Assembly="OF.Controls" Namespace="OF.Controls" TagPrefix="cc1" %>
<%@ Register Src="~/admin/controls/head.ascx" TagPrefix="uc1" TagName="head" %>
<%@ Register Src="~/admin/controls/footer.ascx" TagPrefix="uc1" TagName="footer" %>
<%@ Register Src="~/admin/controls/menu.ascx" TagPrefix="uc1" TagName="menu" %>

<!DOCTYPE HTML>
<html>
<head>
    <title>商户资料</title>
    <meta charset="gbk">
    <link href="res/css/main.css" rel="stylesheet">
    <link href="res/css/public.css" rel="stylesheet">
    <link href="res/css/table.css" rel="stylesheet">
    <link href="res/css/flexigrid.css" rel="stylesheet">
    <script type="text/javascript" src="res/js/jquery-1.8.0.min.js"></script>
    <script src="res/js/flexigrid.pack.js" type="text/javascript"></script>
</head>
<body>

    <form id="form1" runat="server">
        <uc1:head runat="server" ID="head" />

        <div id="page">
            <div class="clearfix" id="content">
                <div class="col-main">
                    <div class="main-wrap">
                        <asp:HiddenField ID="hforderid" runat="server" />
                        <asp:HiddenField ID="hfstate" runat="server" />
                        <div class="division">
                            <table>
                             
                                <tr id="divbtn" runat="server">
                                    <td colspan="2">
                                        <asp:Button ID="btnYes" CssClass="rz-deep-btn" runat="server" Text="处理" OnClick="btnYes_Click" />
                                        <asp:Button ID="btnNo" CssClass="rz-deep-btn" runat="server" Text="不处理" OnClientClick="return show();" OnClick="btnNo_Click" />
                                      <asp:HiddenField ID="hfdesc" runat="server" />
                                     </td>
                                </tr>

                                <tr>
                                    <td>订单编号:</td>
                                    <td>
                                        <asp:Label ID="labordersn" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>订餐类型:</td>
                                    <td>
                                        <asp:Label ID="labtype" runat="server" Style="color: red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>联系电话:</td>
                                    <td>
                                        <asp:Label ID="labphone" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>预约时间:</td>
                                    <td>
                                        <asp:Label ID="labtime" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr id="trcount" runat="server">
                                    <td>预约人数:</td>
                                    <td>
                                        <asp:Label ID="labcount" runat="server">0</asp:Label>人
                                    </td>
                                </tr>
                                <tr id="traddress" runat="server">
                                    <td>送餐地址:</td>
                                    <td>
                                        <asp:Label ID="labaddress" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>说明:</td>
                                    <td>
                                        <asp:Label ID="labremark" runat="server"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                       
                    </div>

                    <div class="main-wrap">
                        <table id="flexme1" class="gridScroller">
                            <thead>
                                <tr>
                                    <th width="150">菜名</th>
                                    <th width="100">数量</th>
                                    <th width="100">单价</th>
                                    <th width="100">总价</th>
                                </tr>
                            </thead>
                            <tbody>
                                <asp:Repeater ID="rptList" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td width="100px"><%#GetName(Eval("dishid")) %></td>
                                            <td width="100px"><%#Eval("count") %></td>
                                            <td width="100px"><%#Eval("price") %></td>
                                            <td width="100px"><%#Convert.ToDecimal(Eval("count"))*Convert.ToDecimal(Eval("price")) %></td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                    </div>
                </div>
                <uc1:menu runat="server" ID="menu" />
            </div>
        </div>

        <uc1:footer runat="server" ID="footer" />
        <link href="res/plus/artDialog/skins/blue.css" rel="stylesheet">
      
    <script type="text/javascript" src="res/plus/artDialog/jquery.artDialog.js"></script>
    <script type="text/javascript" src="res/plus/artDialog/plugins/iframeTools.js"></script>

        <script type="text/javascript">
            $(document).ready(function ($) {
                $('#flexme1').flexigrid();
            });
            var check = false;
            function show() {
                if (check == true) {
                    alert("ok");
                    return true;
                }
                if(confirm("该操作会导致订单不再被处理")){
                    art.dialog({
                        id: 'shake-demo',
                        title: '不处理原因',
                        content: '<input type="text" name="txtdesc"/>',
                        lock: true,
                        fixed: true,
                        ok: function () {
                            var val = $('input:text[name="txtdesc"]').val();
                            if (val == null|| val =="") {
                                alert("请输入原因");
                                return false;
                            }
                            else {
                                alert("val ="+val);
                                $("#hfdesc").val(val);
                                result = true;
                                document.getElementById("btnNo").click();
                            }
                            return true;
                        },
                        okValue: '确定',
                    });
                }
                return result;
            }
        </script>
    </form>
</body>
</html>
